const _request = option => uni.$http.create().setConfig({ ...option, showLoading: false }).request()

//获取词汇测试列表
export const worksList = data => _request({ url: '/vocabulary-exam/list-page', data }) 
//获取学习进度列表
export const planList = data => _request({ url: '/learn-progress/list-page', data })
//获取课程词汇列表
export const courseList = data => _request({ url: '/course-vocabulary/list-page', data })
//获取排课列表
export const appointmentList = data => _request({ url: '/user-appointment/list', data })
//开始测试
export const tsetStart = data => _request({ url: '/vocabulary-exam/start',data,method:'post'})
//获取测试词汇列表
export const testWordsList = data => _request({ url: '/vocabulary-exam/words-list', data })
//提交测试答案
export const tsetAnswer = data => _request({ url: '/vocabulary-exam/answer',data,method:'post'})
//获取测试详情
export const examDetail = data => _request({ url: '/vocabulary-exam', data })
//获取词汇记录列表
export const examlistPage = data => _request({ url: '/vocabulary-exam/list-page', data })

/** 获取课程详情 */
export const appointment = data => _request({ url: '/user-appointment', data });

/** 提交抗遗忘复习 */
export const reviewCycle = data => _request({ url: '/review-cycle/cycle-log', data, method: 'post' });
